Skip to content

feat(inbox): add Google Search Console as a self-driving source#3742

Merged
trunk-io[bot] merged 1 commit into
mainfrom
tom/inbox-google-search-console
Jul 23, 2026
Merged

feat(inbox): add Google Search Console as a self-driving source#3742
trunk-io[bot] merged 1 commit into
mainfrom
tom/inbox-google-search-console

Conversation

@Gilbert09

Copy link
Copy Markdown
Member

Problem

Google Search Console is now a Self-driving inbox signal source (backend PR: PostHog/posthog#73079), but the inbox Sources modal had no way to turn it on or connect it.

Changes

Registers Google Search Console in the inbox source registry so it appears as a toggle and connects through the existing generic setup form.

  • EXTERNAL_INBOX_SOURCES: new google_search_console entry (watches search_analytics_by_query_page, setup: "dynamic"). The toggle card, source filter, and SourceProduct unions all derive from this registry, so no other wiring is needed.
  • New search_opportunity record kind. sourceNeedsFullRefresh treats it as append-only (incremental sync) like tickets, because GSC's per-day search rows are immutable once written — unlike issues, which mutate and need full refresh.
  • Source-product icon/label metadata (magnifying-glass icon).

No bespoke setup form: DynamicSourceSetup already renders the source's OAuth grant (oauth field, connect-by-kind) and property picker (oauth-account-select), which is exactly GSC's connect-form shape.

Depends on PostHog/posthog#73079 shipping first. The toggle's create call sends source_product: "google_search_console", which the Signals model rejects with a 400 until that backend PR lands the enum value.

How did you test this?

  • pnpm --filter @posthog/shared build, biome lint on the changed files, and pnpm typecheck across the repo (24/24 packages) all pass. The unions consumed across packages type-check against the new registry entry.
  • No new tests: the registry is type-enforced (a bad entry fails typecheck), and there is no runtime registry test to extend.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Registers Google Search Console in the shared EXTERNAL_INBOX_SOURCES registry
so the toggle card, source filter, and source-product unions pick it up. Adds
a search_opportunity record kind (append-only incremental sync, like tickets)
and a magnifying-glass icon. The generic DynamicSourceSetup already handles the
source's OAuth grant and property picker, so no bespoke setup form is needed.

Depends on the posthog/posthog backend PR shipping the google_search_console
SignalSourceProduct choice first (the toggle create call rejects an unknown
source_product with a 400).
@Gilbert09 Gilbert09 self-assigned this Jul 23, 2026
@trunk-io

trunk-io Bot commented Jul 23, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 9b63f71.

@posthog

posthog Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

👋 Visual changes detected for this PR.

Review and approve in PostHog Visual Review

If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix.

@Gilbert09 Gilbert09 added the Stamphog This will request an autostamp by stamphog on small changes label Jul 23, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Purely additive registry entries (new inbox source + icon metadata) with no host-boundary or business-logic risk; author has strong familiarity with these exact files.

  • Author wrote 100% of the modified lines and has 4 merged PRs in these paths (familiarity STRONG).
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 28L, 2F substantive — within ceiling
tier T1-agent / T1b-small (28L, 2F, single-area, feat)
stamphog 2.0.0b3 .stamphog/policy.yml @ f057f43 · reviewed head 9b63f71

@trunk-io
trunk-io Bot merged commit 72fff49 into main Jul 23, 2026
34 of 36 checks passed
@trunk-io
trunk-io Bot deleted the tom/inbox-google-search-console branch July 23, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant